package com.fwj.authorization.staff.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fwj.base.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;

/**
 * 权限实体
 *
 * @author 樊温军
 * @date 2025/3/18 上午10:32
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(description = "权限")
public class SysPermission extends BaseDTO {

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键ID")
    private Long id;

    /**
     * 权限码名称
     */
    @NotBlank(message = "权限码名称不能为空")
    @ApiModelProperty(value = "权限码名称")
    private String name;

    /**
     * 权限码注释
     */
    @TableField("`description`")
    @NotBlank(message = "权限码注释不能为空")
    @ApiModelProperty(value = "权限码注释")
    private String description;

    /**
     * 权限码地址值
     */
    @NotBlank(message = "权限码地址值不能为空")
    @ApiModelProperty(value = "权限码地址值")
    private String url;

    /**
     * 角色编码
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "角色编码")
    private String roleCode;

}
